'use strict';

const Controller = require('../../../core/common');

class FeedbacksController extends Controller {

  // 客户端反馈 content
  async create() {
    const { ctx } = this;

    this.ctx.validate({
      id: { type: 'number' },
      openId: { type: 'string' },
      nickname: { type: 'string' },
      content: { type: 'string' },
      createdAt: { type: 'string' },
      updatedAt: { type: 'string' },
      status: { type: 'string' },
      content: { type: 'string' },
    }, ctx.request.body);

    const data = await ctx.service.v1.feedbacks.create(ctx.request.body);

    this.success(data);
  }
}

module.exports = FeedbacksController;